package com.project.internship.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.internship.entity.Allot;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.internship.entity.Student;
import com.project.internship.entity.Teacher;
import com.project.internship.vo.StudentDeptMajorClassVO;
import com.project.internship.vo.StudentRecordVO;
import com.project.internship.vo.TeacherDeptVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2020-04-11
 */
@Repository
public interface AllotMapper extends BaseMapper<Allot> {

    /**
     * 教师端查询学生信息
     * 根据学号
     * @param page
     * @param keyword
     * @return
     */
    IPage<StudentDeptMajorClassVO> getAllAllotStudents(Page<StudentDeptMajorClassVO> page, @Param("teacherId") Integer teacherId,@Param("keyword") String keyword);

    IPage<StudentDeptMajorClassVO> getAllReceivedStudents(Page<StudentDeptMajorClassVO> page, @Param("baseId") Integer baseId,@Param("keyword") String keyword);

    IPage<StudentDeptMajorClassVO> getBaseStudent(Page<StudentDeptMajorClassVO> page, @Param("bid") Integer bid, @Param("departmentId") Integer departmentId, @Param("currentYear") String currentYear);

    IPage<StudentRecordVO> getStudentRecord(Page<StudentRecordVO> page, @Param("departmentId") Integer departmentId, @Param("keyword") String keyword);
}
